From: Giovanni Campagna Date: Mon, 29 Oct 2012 16:40:55 +0000 (+0100) Subject: ShellUserVerifier: fix fail counter X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5524 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b9463d23e88da8f6451254fc0f43f1614ce64cde;p=gnome-shell.git ShellUserVerifier: fix fail counter If it is updated after checking, it counts the number of failures not including the current one, so it allows one extra attempt. Instead, by updating it before checking, we get the expected result of dropping the curtain at the third password. https://bugzilla.gnome.org/show_bug.cgi?id=687132 --- diff --git a/js/gdm/util.js b/js/gdm/util.js index da31daab8..d71e55f6e 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -333,12 +333,11 @@ const ShellUserVerifier = new Lang.Class({ // Otherwise, we allow ALLOWED_FAILURES attempts. After that, we // go back to the welcome screen. + this._failCounter++; let canRetry = retry && this._userName && this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY); if (canRetry) { - this._failCounter++; - this.clear(); this.begin(this._userName, new Batch.Hold()); } else {